package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;

@Schema(description="生产加工订单明细表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_production_order_detail")
public class WarehouseProductionOrderDetail extends BaseEntity<WarehouseProductionOrderDetail> {

    @TableField(value = "product_variety_id")
    @Schema(description="品种id")
    private Long productVarietyId;

    @TableField(value = "product_variety")
    @Schema(description="品种名称")
    private String productVariety;

    @TableField(value = "product_code")
    @Schema(description="客户成品料号")
    private String productCode;

    @TableField(value = "product_spec_code")
    @Schema(description="规格")
    private String productSpecCode;

    @TableField(value = "diameter")
    @Schema(description="厚度/壁厚/直径")
    private BigDecimal diameter;

    @TableField(value = "warehouse_width")
    @Schema(description="宽度/外径")
    private BigDecimal warehouseWidth;

    @TableField(value = "warehouse_length")
    @Schema(description="长度")
    private String warehouseLength;

    @TableField(value = "product_main_unitId")
    @Schema(description="成品单位id")
    private Long productMainUnitId;

    @TableField(value = "product_main_unit")
    @Schema(description="成品单位名称")
    private String productMainUnit;

    @NotNull
    @Positive
    @TableField(value = "required_quantity")
    @Schema(description="需求数量")
    private Integer requiredQuantity;

    @TableField(value = "material_number")
    @Schema(description="材料料号")
    private String materialNumber;

    @TableField(value = "processing_drawing")
    @Schema(description="加工图纸")
    private String processingDrawing;

    @TableField(value = "warehouse_production_order_id")
    @Schema(description="生产加工订单表ID")
    private Long warehouseProductionOrderId;

    @TableField(value = "product_id")
    @Schema(description="客户成品料号id")
    private Long productId;

    @TableField(value = "schedule_quantity")
    @Schema(description="剩余排产数")
    private Integer scheduleQuantity;

    @TableField(value = "state")
    @Schema(description="状态1.未排产，2已排产")
    private Integer state;

    @TableField(value = "net_weight")
    @Schema(description="净重")
    private Double netWeight;

    @TableField(value = "price")
    @Schema(description="价格")
    private BigDecimal price;

    @TableField(value = "sys_bundle_list")
    @Schema(description="系统捆包号集合")
    private String sysBundleList;

    @TableField(value = "product_brand_id")
    @Schema(description="品牌id")
    private Long productBrandId;

    @TableField(value = "product_producer_id")
    @Schema(description="生产商id")
    private Long productProducerId;

    @TableField(value = "bundle_quantity")
    @Schema(description="捆包件数")
    private Integer bundleQuantity;

    @TableField(value = "subtotal")
    @Schema(description="小计")
    private String subtotal;

    @TableField(value = "unit_weight")
    @Schema(description="单位重量")
    private String unitWeight;

    @TableField(value = "theoretical_weight")
    @Schema(description="单位重量")
    private String theoreticalWeight;

    @TableField(value = "package_method")
    @Schema(description="包装方式")
    private Integer packageMethod;

    @TableField(value = "product_type")
    @Schema(description="产品类型")
    private Integer productType;

    @TableField(value = "child_bundle")
    @Schema(description="子捆包号")
    private String childBundle;


}
